import { ssoService, normalService, carService } from '@/api/fetch'
// carService:竞价车队信息
// import qs from 'qs'
// 查询租户(公司)列表
export function getListByCorpName(params) {
  return ssoService({
    url: '/tenant/listByCorpName',
    method: 'get',
    params
  })
}

// 租户注册(uaa)
export function registerTenant(data) {
  return ssoService({
    url: '/tenant/create',
    method: 'post',
    data
  })
}
// 公司注册(lisa-lspm)
export function registerLsp(data) {
  return normalService({
    url: '/lsp/registLsp',
    method: 'post',
    data
  })
}
// 司机注册(uaa)
export function registerDirver(data) {
  return ssoService({
    url: '/tenant/account/create',
    method: 'post',
    data
  })
}

// 获取注册账号(lisa-lspm)
export function getAccount(id) {
  return ssoService({
    url: '/account/getAccount?identifier=' + id,
    method: 'get'
  })
}
// 司机注册(lisa-lspm)
export function getDirverRegist(data) {
  return normalService({
    url: '/driver/registDriver',
    method: 'post',
    data
  })
}

// 单点登录-登录获取ssotoken(uaa)
export function getSsoToken(data) {
  return ssoService({
    url: '/oauth/token',
    method: 'post',
    data
  })
}

// 获取车队信息-全员采购-增加/lisa-lspm
export function getCarInfo(mobile) {
  return carService({
    url: '/lsp/queryUserInfo?phone=' + mobile,
    method: 'get'
  })
}


// 司机根据手机号登录(lisa-lspm)
export function getLogin(mobile) {
  return normalService({
    url: '/driver/login/' + mobile,
    method: 'get'
  })
}

// 单点登录-请求短信验证码(uaa)
export function getLoginVerifyCode(data) {
  return ssoService({
    url: '/account/signin/smscode',
    method: 'post',
    data
  })
}

// 获取账号信息(uaa)
export function getAccountInfo(params) {
  return ssoService({
    url: '/account/getAccount',
    method: 'get',
    params
  })
}

// 修改密码(uaa)
export function getUpdatePassword(data) {
  return ssoService({
    url: '/account/updatePassword',
    method: 'post',
    data
  })
}

